package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.domain.StrategyContent;
import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import cn.wolfcode.trip.base.service.IStrategyService;
import cn.wolfcode.trip.base.util.JSONResult;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@RestController
@RequestMapping("/details")
public class StrategyDetailController {
    @Autowired
    private IStrategyDetailService strategyDetailService;

    /**
     * 根据id查询细节,包含文章内容
     * @param detailId
     * @return
     */
    @GetMapping("/{detailId}")
    public Object selectById(@PathVariable Long detailId){
        StrategyDetail detail = strategyDetailService.selectById(detailId);
        return detail;
    }

}
